# A good practice is to check how much time it takes to create an "almost random" candidates
#!/bin/bash

# Create 1GB of passwords length with /dev/urandom and packing it with gzip
# will tell us how much time it takes relatively to other generator and ~Entropy after commpression
# 552MB compressed gzip contains 86,436,999 passwords and 67% compression ratio took 36m37.607s

echo Running test...

#TODO: Each grep produces extra computational usage -> the command should be reduced to single grep command
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 8 | grep  -e '^[a-z]\{1\}[a-zA-Z0-9]\{7\}$' | grep -e '[A-Z]' | grep -e '[0-9]' | head -c 1048576015 | gzip -c9 > test.gz
